package com.company.cloud.product.modules.mgr.controller.req;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotNull;

import com.company.cloud.common.bean.BaseParam;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ProductStockOutSaveParam extends BaseParam {


	@ApiModelProperty(value = "仓库名称")
	private String warehouseName;

	@ApiModelProperty(value = "客户编号")
	private String custNo;

	@ApiModelProperty(value = "客户名称")
	private String custName;

	@ApiModelProperty(value = "车牌")
	private String carNo;

	@ApiModelProperty(value = "备注")
	private String memo;

	@ApiModelProperty(value = "出库明细", required = true)
	@NotNull(message = "出库明细不能为空")
	private List<ProductStockOutSaveParamItem> items;

	public void addItem(ProductStockOutSaveParamItem item) {
		if (this.items == null) {
			this.items = new ArrayList<ProductStockOutSaveParamItem>();
		}
		if (item != null) {
			this.items.add(item);
		}
	}

}
